package com.example.demo.yzy.vo;

import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
* @description: TODO
* @author 杨镇宇
* @date 2022/3/24 15:28
* @version 1.0
*/

public class QueryVo {
    @ApiModelProperty("id")
    @NotNull(message ="id 不能为null")
    private  Long id;
    @ApiModelProperty("姓名")
    @NotEmpty(message ="姓名 不能为空")
    private String name;
    @ApiModelProperty("年龄")
    @Min(value = 5, message = "年龄最小值-5")
    @Max(value = 100, message = "年龄最大值-100")
    private Integer age;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
}
